package com.cndw.kungfu.dao;

import java.util.List;
import java.util.Map;

import com.cndw.dao.jade.annotation.DAO;
import com.cndw.dao.jade.annotation.SQL;
import com.cndw.kungfu.domain.Pendant;
import com.cndw.kungfu.domain.Scene;

@DAO
public interface SceneDao {

	public static final String TABLE = " kfsys_scene ";

	public static final String FIELDS = " id,name,type,rootId,mapFile,icon,scriptOnEnter,scriptOnExit,defaultBirth,upOpen,downOpen,leftOpen,rightOpen,upTeleport,downTeleport,leftTeleport,rightTeleport,openKey,openParam1,openParam2,enterTips,liftTime,upScene,downScene,leftScene,rightScene,music";

	public static final String TABLE_PENDANT = "kfsys_scene_pendant";

	public static final String FIELDS_PENDANT = "id,name,type,sceneId,x,y,randX,randY,icon,taskId,gainId,gainNum,typeRefresh,refreshNum,intervalTime,clickTips,storyOnOpen";

	/**
	 * 获取一系列场景的信息
	 * 
	 * @param type
	 * @return
	 */
	@SQL("select " + FIELDS + " from " + TABLE + " order by id asc ")
	public List<Scene> getAllScenes();

	/**
	 * 获取全部挂件
	 * 
	 * @return
	 */
	@SQL("select " + FIELDS_PENDANT + " from " + TABLE_PENDANT + " order by id asc ")
	public Map<Integer, Pendant> getAllPendants();

}
